home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / biz / misc / imagefxdevkit.lha / doc / Saver.autodoc < prev    next >
Text File  |  1992-12-12  |  9KB  |  264 lines

  1. TABLE OF CONTENTS
  2.  
  3. saver.library/SM_SaveMapped
  4. saver.library/SM_SavePalette
  5. saver.library/SM_SaveTrue
  6. saver.library/SM_Signatures
  7.  
  8.  
  9. saver.library/SM_SaveMapped                       saver.library/SM_SaveMapped
  10.  
  11.     NAME
  12.         SM_SaveMapped -- Save colormapped image to disk.
  13.  
  14.     SYNOPSIS
  15.         success = SM_SaveMapped ( filename, mappedimage, id,  args );
  16.         D0.L                      A0        A1           D0.L A2
  17.  
  18.         BOOL SM_SaveMapped ( char *, struct MappedImage *, int, LONG * );
  19.  
  20.     FUNCTION
  21.         Write a colormapped (usually rendered) image file to disk in the file
  22.         format that this save module supports.
  23.  
  24.         Currently supports up to 8 bitplane images.
  25.  
  26.     INPUTS
  27.         filename -- name of file the user has selected to save the image to.
  28.  
  29.         mappedimage -- pointer to a MappedImage structure which describes the
  30.             image data to save.  The MappedImage fields are described below:
  31.  
  32.                 Width, Height:
  33.                     Width and height of the image in pixels.
  34.  
  35.                 BitMap:
  36.                     Pointer to a BitMap structure containing the image data
  37.                     for this image.  The depth of the image may be obtained
  38.                     from the BitMap->Depth field.  You should not rely on the
  39.                     BitMap->BytesPerRow field being an indication of the image
  40.                     width, since under AGA this may not be accurate.  Under
  41.                     V39, this bitmap could very well have been allocated with
  42.                     the new graphics.library function AllocBitMap().
  43.  
  44.                 ViewPort:
  45.                     Obsolete.
  46.  
  47.                 Copper:
  48.                     Not used.
  49.  
  50.                 Palette.Depth:
  51.                     Number of bitplanes in the palette.  Should be the same as
  52.                     the Bitmap depth.
  53.  
  54.                 Palette.Count:
  55.                     Number of colors in the palette.  Should be 1 << Depth.
  56.  
  57.                 Palette.Table:
  58.                     Pointer to the actual colors in the palette, arranged as
  59.                     follows:  R0G0B0 R1G1B1 R2G2B2 ... RnGnBn.
  60.  
  61.                 Modes:
  62.                     View modes for the image.  Under 2.0 or later, this is the
  63.                     display mode for the image.
  64.  
  65.                 AspectX, AspectY:
  66.                     Pixel aspect ratio of image.
  67.  
  68.  
  69.     RESULTS
  70.         TRUE if successful or FALSE on failure, with an appropriate secondary
  71.         error code set using SetError().
  72.  
  73.     EXAMPLE
  74.  
  75.     NOTES
  76.  
  77.     BUGS
  78.  
  79.     SEE ALSO
  80.  
  81.  
  82. saver.library/SM_SavePalette                     saver.library/SM_SavePalette
  83.  
  84.     NAME
  85.         SM_SavePalette -- Save palette file to disk.
  86.  
  87.     SYNOPSIS
  88.         success = SM_SavePalette ( filename, palette, id );
  89.         D0.L                       A0        A1       D0.L
  90.  
  91.         BOOL SM_SavePalette ( char *, struct Palette *, int );
  92.  
  93.     FUNCTION
  94.         This function is used to save a palette file to disk in the format
  95.         used by this saver module.  It is currently not used by ImageFX.
  96.  
  97.     INPUTS
  98.         filename -- name of file the user has selected to save the palette
  99.             to.
  100.  
  101.         palette -- pointer to Palette structure (see scan/loadsave.h).
  102.  
  103.         id -- file format "flavor" ID.
  104.  
  105.     RESULTS
  106.         TRUE if successful, or FALSE on failure with a secondary error code
  107.             set using the SetError() function.
  108.  
  109.     EXAMPLE
  110.  
  111.     NOTES
  112.         ImageFX can currently only save palettes in ILBM format.
  113.  
  114.     BUGS
  115.  
  116.     SEE ALSO
  117.  
  118.  
  119. saver.library/SM_SaveTrue                           saver.library/SM_SaveTrue
  120.  
  121.     NAME
  122.         SM_SaveTrue -- Save true-color image to disk.
  123.  
  124.     SYNOPSIS
  125.         success = SM_SaveTrue ( filename, buffer, id,  args );
  126.         D0.L                    A0        A1      D0.L A2
  127.  
  128.         BOOL SM_SaveTrue ( char *, struct Buffer *, int, LONG * );
  129.  
  130.     FUNCTION
  131.         Write a true-color (8-bit greyscale or 24-bit color) image file to
  132.         disk in the file format that this saver module handles.
  133.  
  134.     INPUTS
  135.         filename -- name of file to save the image to.
  136.  
  137.         buffer -- pointer to the Buffer structure describing the image to be
  138.             saved.  Some of the fields you will probably need to look at are
  139.             as follows:
  140.  
  141.                 Width:
  142.                     Width of the image in pixels.
  143.  
  144.                 Height:
  145.                     Height of the image in pixels.
  146.  
  147.                 Depth:
  148.                     Number of 8-bit chunky planes in the image (1 == greyscale
  149.                     and 3 == color).
  150.  
  151.                 PixAspectX:
  152.                     Horizontal pixel aspect ratio.
  153.  
  154.                 PixAspectY:
  155.                     Vertical pixel aspect ratio.
  156.  
  157.                 DPIX:
  158.                     Horizontal dots per inch.
  159.  
  160.                 DPIY:
  161.                     Vertical dots per inch.
  162.  
  163.             Buffer image data itself should only be accessed via. calls to
  164.             GetBufLine() (see scan.library autodoc).  You do not need to
  165.             ObtainBuffer() the buffer, nor should you ReleaseBuffer() it.
  166.  
  167.         id -- ID number indicating what "flavor" of format the user selected
  168.             to use in saving the image.  ID's may be utilized by the saver
  169.             module through the SM_Signatures() function.
  170.  
  171.         args -- Arguments from an Arexx command invocation.  Most savers will
  172.             not need to worry about this, but it can be used to allow passing
  173.             parameters to the saver via. Arexx commands.  Note that you must
  174.             fill in the ModuleBase->CmdTable field for this to be used.
  175.  
  176.     RESULTS
  177.         success -- TRUE if file loaded successfully, or FALSE if something
  178.             goes wrong with an additional secondary error code set by using
  179.             the SetError() function.
  180.  
  181.     EXAMPLE
  182.  
  183.     NOTES
  184.  
  185.     BUGS
  186.  
  187.     SEE ALSO
  188.  
  189.  
  190. saver.library/SM_Signatures                       saver.library/SM_Signatures
  191.  
  192.     NAME
  193.         SM_Signatures -- Return information about this saver module.
  194.  
  195.     SYNOPSIS
  196.         formatarray = SM_Signatures ();
  197.         D0.L
  198.  
  199.         struct SaveFormat *SM_Signatures ( void );
  200.  
  201.     FUNCTION
  202.         Return information to ImageFX about this saver module's supported file
  203.         formats.
  204.  
  205.     INPUTS
  206.         None.
  207.  
  208.     RESULTS
  209.         formatarray -- pointer to an array of SaveFormat structures, each of
  210.             which describes a type of file format this saver can save.  The
  211.             fields of the SaveFormat structure are:
  212.  
  213.                 Name:
  214.                     Pointer to a name string for this file format.
  215.  
  216.                 Flags:
  217.                     Flag bits for this saver module.  Currently defined flag
  218.                     bits are:
  219.  
  220.                         SAV_TRUE        This module can save true color
  221.                                         images.
  222.  
  223.                         SAV_MAPPED      This module can save colormapped
  224.                                         (rendered) images.
  225.  
  226.                         SAV_PALETTE     This module can save palettes (you
  227.                                         shouldn't ever set this for now).
  228.  
  229.                         SAV_CMYK        This format supports CMYK (currently
  230.                                         unused).
  231.  
  232.                         SAV_NOREQ       User should not be prompted about
  233.                                         whether he wishes to overwrite
  234.                                         existing files when saving to this
  235.                                         format.  Useful for formats that allow
  236.                                         appending (ie. anim formats).
  237.  
  238.                         SAV_NOMASK      This file format does not support mask
  239.                                         planes, for saving defined region
  240.                                         information.
  241.  
  242.                         SAV_NOFILE      This file format does not require a
  243.                                         filename (eg. clipboard).
  244.  
  245.                         SAV_NOICON      Do not ever save an icon associated
  246.                                         with this file.
  247.  
  248.  
  249.                 ID:
  250.                     ID number for this format "flavor".  If the user chooses
  251.                     to save in this format, this ID number is passed to the
  252.                     appropriate saver function.  If you return more than one
  253.                     SaveFormat structure, this can be used to distinguish
  254.                     which format the user is saving in.
  255.  
  256.     EXAMPLE
  257.  
  258.     NOTES
  259.  
  260.     BUGS
  261.  
  262.     SEE ALSO
  263.  
  264.